home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / kuaqe2.zip / AMTEST.QC < prev    next >
Text File  |  1996-07-25  |  2KB  |  86 lines

  1. /*~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>
  2. ~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~*/
  3.  
  4. void() test_teleport_touch;
  5. void() tele_done;
  6.  
  7. /*QUAKED test_teleport (0 .5 .8) ?
  8. Teleporter testing
  9. */
  10. void() test_teleport =
  11. {
  12.     precache_model ("sprites/s_aball.spr");
  13.     setsize (self, self.mins, self.maxs);    
  14.     self.touch = test_teleport_touch;
  15.     self.solid = 1;
  16.     
  17.     if (!self.target)
  18.         objerror ("no target\n");
  19. };
  20.  
  21. void() test_teleport_touch =
  22. {
  23. local entity oldself;
  24.     other.movetype = MOVETYPE_TOSS;
  25. //    other.solid = SOLID_NOT;
  26.     other.dest = '256 -128 -128';
  27.     oldself = self;
  28.     self = other;
  29. //    SUB_CalcMove (self.dest, 200, tele_done);
  30.     self.velocity = '1000 0 0 ';
  31.     self = oldself;
  32. };
  33.  
  34. void() tele_done =
  35. {
  36.     self.movetype = MOVETYPE_WALK;
  37.     self.solid = SOLID_SLIDEBOX;    
  38. };
  39.  
  40. /*~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>
  41. ~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~<~>~*/
  42.  
  43. void() test_goaway;
  44. void() test_spawn;
  45.  
  46. /*QUAKED test_fodder (0 .5 .8) ?
  47. beating guy
  48. */
  49. void() test_fodder =
  50. {
  51.     self.nextthink = time + 3;
  52.     self.think = test_spawn;
  53. };
  54.  
  55. void() test_spawn =
  56. {
  57. local entity    body;
  58.     makevectors (self.angles);
  59.  
  60.     body = spawn();
  61.     setmodel (body, "progs/soldier.mdl");
  62.     setorigin (body, self.origin);
  63.     body.classname = "player";
  64.     body.health = 1000;
  65.     body.frags = 0;
  66.     body.takedamage = DAMAGE_AIM;
  67.     body.solid = SOLID_SLIDEBOX;
  68.     body.movetype = MOVETYPE_WALK;
  69.     body.show_hostile = 0;
  70.     body.weapon = 1;
  71.     body.velocity = v_forward * 200;
  72.  
  73.     body.nextthink = time + 5;
  74.     body.think = test_goaway;
  75.  
  76. self.nextthink = time + 3;
  77. self.think = test_spawn;
  78.  
  79. };
  80.  
  81. void() test_goaway =
  82. {
  83.     remove (self);
  84. };
  85.  
  86.